{{include file="common@layout/_meta_x-admin" /}}
<body>
{{:widget('common/Common/nav',[array('系统管理','系统配置')])}}
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form">
            {{volist id="vo" name="configList"}}
                {{if condition="$vo.type == 1"}}
                {{:widget('common/Form/input',[$vo.config_name,$vo.config_key,$vo.value,'number'])}}
                {{elseif condition="$vo.type == 2" /}}
                {{:widget('common/Form/upload',[$vo.config_name,$vo.config_key,$vo.value,1,16,9, 'upload/system'])}}
                {{elseif condition="$vo.type == 3" /}}
                {{:widget('common/Form/tinymce',[$vo.config_name,$vo.config_key,$vo.value,true])}}
                {{/if}}
            {{/volist}}
            {{:widget('common/Form/submit')}}
        </form>
    </div>
</div>
</body>
<script>
    layui.use(['form','jquery'], function(){
        var form = layui.form;
        var $ = layui.jquery;

        //监听提交
        form.on('submit(submitForm)', function(data){
            getTinyMCE(data);
            ajaxRequest('',data.field,function (res) {
                if(res.code == 200){
                    layerMsg("修改成功");
                }
            })
            return false;
        });
    });
</script>